/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jili.ubert.code.server2client;

import com.baidu.bjf.remoting.protobuf.Codec;
import com.baidu.bjf.remoting.protobuf.ProtobufProxy;
import com.baidu.bjf.remoting.protobuf.annotation.Protobuf;
import java.io.IOException;

/**
 *
 * @author ChengJiLi
 */
public class MsgResult {
    @Protobuf
    public boolean success;
    @Protobuf
    public int returnID;
    @Protobuf
    public String word;
    public void setSuccess(boolean success){
        this.success = success;
    }
    public boolean getSuccess(){
        return success;
    }
    public void setReturnID(int returnID){
        this.returnID = returnID;
    }
    public int getReturnID(){
        return returnID;
    }
    public void setWord(String word){
        this.word = word;
    }
    public String getWord(){
        return word;
    }
    public byte[] EnCode(MsgResult msg) throws IOException{
        Codec<MsgResult> Lcode = ProtobufProxy.create(MsgResult.class);
        return Lcode.encode(msg);
    }
    public MsgResult DeCode(byte[] data) throws IOException{
        Codec<MsgResult> Lcode = ProtobufProxy.create(MsgResult.class);
        return Lcode.decode(data);
        
    }
}
